# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-power-manager
pkgver=3.24.0+5+gceaae952
pkgrel=1
pkgdesc="System power information and statistics"
url="https://git.gnome.org/browse/gnome-power-manager"
arch=(i686 x86_64)
license=(GPL)
depends=(gtk3 upower dconf)
makedepends=(intltool gnome-common git meson)
_commit=ceaae9523388e805f60f1faffa46fda129f571e6  # master
source=("git+https://git.gnome.org/browse/gnome-power-manager#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^GNOME_POWER_MANAGER_//;s/_/./g;s/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  meson --prefix=/usr --buildtype=release ../$pkgname
  ninja
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
